This set of codes is for computation of panel AR Monte Carlo experiments in "An Augmented Anderson-Hsiao Estimator for Dynamic Short-T Panels" by A. Chudik and M.H. Pesaran, March 23, 2021.

There are two possible ways of executing Monte Carlo experiments: a) on a cluster or b) on a local desktop.

A. Executing MC experiments on a cluster

1. Use script 'submit_MDCS_jobF1.m' to submit MC jobs to a cluster. Please make sure to set up lines 5-10 of this script for your available cluster, where Matlab MDCS jobs could be executed.
2. Once jobs are finished, copy the result mat files from the cluster folder (specified in submit_MDCS_jobF1.m) to a local matlab workspace.
3. Run script 'save_from_cluster_ARF.m' to load the result mat files and save selected results into Excel files: 'expF_phiX_Y.xls', where X=4, 8, and 9 (corresponding to value of phi=0.4, 0.8, and 0.9), and Y=1,2 and 4 (corresponding to different experiments regarding the validity of AB and BB codnitions, as outlined in the paper). Excel file 'summary_tables.xlsx', which is linked to the individual Excel files, contains the main tables:
 - Sheet 'AH vs AAH' contains findings presented in Tables 2 and 3 of the paper. 
 - Sheet 'AAH vs AAH-O' contains findings presented Tables 4 and 5. 
 - Sheet 'A_B1' contains MC findings presented in Tables 6 and 7.
 - Sheet 'A_B2' contains MC findings presented in Tables 8 and 9.
 - Sheet 'A_B4' contains MC findings presented in Tables 10 and 11.
 - Results for Hausman Test (reported in Table 12) under H0 are located in sheet 'A_B1' and under H1 in sheet 'A_B2'.

B. Executing MC experiments on a local desktop

1. Main file to run is 'compute_MC_locally.m'. See Excel file 'summary_tables.xlsx' for main results:
 - Sheet 'AH vs AAH' contains findings presented in Tables 2 and 3 of the paper. 
 - Sheet 'AAH vs AAH-O' contains findings presented Tables 4 and 5. 
 - Sheet 'A_B1' contains MC findings presented in Tables 6 and 7.
 - Sheet 'A_B2' contains MC findings presented in Tables 8 and 9.
 - Sheet 'A_B4' contains MC findings presented in Tables 10 and 11.
 - Results for Hausman Test (reported in Table 12) under H0 are located in sheet 'A_B1' and under H1 in sheet 'A_B2'.

